import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

const routes = [
  {
    path: '/',
    component: () => import("@/views/Home"),
  },
  {
    path: '/overview',
    component:() => import("@/views/Overview"),
  },
  {
    path: '/product',
    component:() => import("@/views/Product"),
  },
  {
    path: '/success-case',
    component:() => import("@/views/SuccessCase"),
  },
  {
    path: '/about',
    component:() => import("@/views/About"),
  },
  {
    path: '/journalism',
    component:() => import("@/views/Journalism"),
  },
  {
    path: '/journalism_details',
    component:() => import("@/views/Journalism_details"),
  },
  {
    path: '/product_details',
    component:() => import("@/views/Product_details"),
  },
  {
    path: '/projectProcess',
    component:() => import("@/views/projectProcess"),
  },
  {
    path: '/projectCase',
    component:() => import("@/views/proCase"),
  },
  {
    path: '/projectCase_detail',
    component:() => import("@/views/projectCase_detail"),
  },
  {
    path: '/industryInformation',
    component:() => import("@/views/IndustryInformation"),
  },
  {
    path: '/industryInformation_detail',
    component:() => import("@/views/IndustryInformation_detail"),
  },
  {
    path: '/TechnicalQA',
    component:() => import("@/views/TechnicalQA"),
  },
  {
    path: '/TechnicalQA_detail',
    component:() => import("@/views/TechnicalQA_detail"),
  },
]
export default new Router({
  routes,
  scrollBehavior (to, from, savedPosition) {
    // return 期望滚动到哪个的位置
    if (savedPosition) {
      return savedPosition
    } else {
      return { x: 0, y: 0 }
    }
  }
})
